package day7;

import day4.BankAcc;

import java.util.*;

/**
 * @author oldliu
 * @since 1.0
 */
public class MapTest {
    public static void main(String[] args) {
        Map<String, BankAcc> m=new HashMap<>();
        m.put("hf--1",new BankAcc("hf--1","老吴","123","shanghai",1000000.0F));
        m.put("hf--2",new BankAcc("hf--2","小刘","1243","shanghai",100030.0F));
        m.put("hf--3",new BankAcc("hf--3","小李","1523","nanjing",60000.0F));
        m.put("hf--4",new BankAcc("hf--4","老张","623","shanghai",1000.0F));

        BankAcc max = Collections.max(m.values());
        System.out.println("薪水最高的人："+max);

        List<BankAcc> list=new ArrayList<>();
        list.addAll(m.values());
        Collections.sort(list);
        System.out.println("排序后：");
        for(BankAcc b:list)
            System.out.println(b);
    }
}
